package com.itheima.homework.assignment.Test03;

/**
 * 定义一个Animal类
 * 定义两个私有属性(颜色:color,个数:numOfLegs),对应的构造以及get/set方法
 * 在Animal中定义一个抽象方法eat()
 */
public abstract class Animal {
    private String color;
    private int numOfLegs;

    public Animal() {
    }

    public Animal(String color, int numOfLegs) {
        this.color = color;
        this.numOfLegs = numOfLegs;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getNumOfLegs() {
        return numOfLegs;
    }

    public void setNumOfLegs(int numOfLegs) {
        this.numOfLegs = numOfLegs;
    }

    public abstract void eat();
}
